package com.rishik.pfsl.core
{
	import mx.collections.ArrayCollection;

	public class Unmarshaller
	{
		public function Unmarshaller() {
		}
		
		public static function unmarshall(xml:XML):ArrayCollection {
			var array:ArrayCollection = new ArrayCollection();
			for each(var xmi:XML in xml.image) {
				var obj:Object = new Object();
				obj["source"] = String(xmi.@source);
				obj["label"] = String(xmi.@label);
				obj["width"] = String(xmi.@width);
				obj["height"] = String(xmi.@height);
				
				array.addItem(obj);
			}
			
			return array;
		}
	}
}